import { checkobjectkey } from "./checkobjectkeys";
import { raw } from "./states";
//@ts-ignore

export default async function loadprerenderedinit() {
    if (process.env.PRERENDER) {
        //@ts-ignore
        const statesdata = await import("../temp/states.js");
        checkobjectkey(statesdata, "menulist", "array");
        checkobjectkey(statesdata, "catalogue", "array");
        const { menulist, catalogue } = statesdata;
        raw.menulist = menulist;
        raw.catalogue = catalogue;
    }
}
